<template>
	<view id="loading" class="coverF flcc" :class="fade" v-if="show">
		<view class="load3">
			<view class="double-bounce1"></view>
			<view class="double-bounce2"></view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"loading",
		props:{
			loading:{
				type:Boolean,
				default:true
			}
		},
		data() {
			return {
				fade:'',
				show:true
			}
		},
		mounted() {
		},
		watch:{
			loading(cur,old){
				this.log(cur,old)
				if(cur == false && old == true){
					this.fade = 'animation-fade-out'
					setTimeout(()=>{
						this.show = false
					},500)
				}else{
					this.show = true
					this.fade = 'animation-fade-in'
				}
			}
		}
	}
</script>

<style>

</style>
